package ssm.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import ssm.entity.Student;
import ssm.mapper.IStudentMapper;
import ssm.util.MyBatisUtil;

public class StudentServiceImpl implements IStudentService {
	// private IStudentDao studentDao = new StudentDaoImpl();
	
	private IStudentMapper studentMapper;
	
	public  StudentServiceImpl() {
		SqlSession sqlSession = MyBatisUtil.getSqlSession();
		studentMapper = sqlSession.getMapper(IStudentMapper.class);
	}

	@Override
	public List<Student> selectAll() {
		return studentMapper.selectAll();
	}

}
